<template>
  <div class="main-box">
    <aside class="left">
      <router-link to="/">基础版本</router-link>
      <router-link to="/elementplus">ElementPlus版本</router-link>
      <router-link to="/slot">Slot复习</router-link>
    </aside>
    <section class="right">
      <router-view v-slot="{ Component }">
        <keep-alive>
          <component :is="Component" />
        </keep-alive>
      </router-view>
    </section>
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

a {
  color: inherit;
}

.main-box {
  max-width: 1200px;
  width: 1200px;
  margin: 0px auto;
  display: flex;
  height: 100vh;

  &>.left {
    flex-grow: 2;
    border: 1px solid #2c3e50;
    margin-right: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  &>.right {
    // 占满其余所有区域
    flex-grow: 8;
    border: 1px solid #2c3e50;
    height: 100%;
  }
}


</style>
